package com.zhaoyue.study.util;

import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.util.List;

/**
 * @author zhaoyue
 * @description:
 * @create 2018-11-20 下午4:40
 **/
public class IOUtilsDemo {
    public static void main(String[] args) throws Exception{

        List<String> list = IOUtils.readLines(new FileInputStream(new File("d://demo.txt")),"UTF-8");
        System.out.println(list.get(0));
        System.out.println(list.get(1));
    }
}
